<template>
  <van-grid :column-num="3">
    <van-grid-item
      v-for="item in hotlist"
      :key="item.id"
      @click="enterIn(item.id)"
    >
      <van-image :src="'http://124.223.14.236:8060/'+item.pic" />
      <p>{{item.title}}</p>
    </van-grid-item>

  </van-grid>
</template>

<script>
export default {
  props: {
    hotlist: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {}
  },
  methods: {
    enterIn (id) {
      // console.log(this.$router.currentRoute.path);
      if (this.$router.currentRoute.path !== '/show') {
        this.$router.push({ path: '/show', query: { id } })
      }
    }
  }
}
</script>

<style>
</style>